package com.bto.solar.work.dto;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.bto.solar.work.entity.Department;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.sql.Timestamp;
import java.util.List;

/**
 * <p>
 * 公司表
 * </p>
 *
 * @author shiyi
 * @since 2023-08-14
 */
@Getter
@Setter
@Accessors(chain = true)
@Data
@ApiModel(value = "Company对象", description = "公司表")
public class CompanyRes {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("公司ID")
    private Long companyId;

    @ApiModelProperty("类型：总部、代理商、项目部")
    private String type;

    @ApiModelProperty("公司名称")
    private String name;

    @ApiModelProperty("省份ID")
    private Long provinceCode;

    @ApiModelProperty("城市ID")
    private Long cityCode;

    @ApiModelProperty("区/县ID")
    private Long districtCode;

    @ApiModelProperty("详细地址")
    private String address;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Timestamp createTime;

    @ApiModelProperty("更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Timestamp updateTime;

    @ApiModelProperty("是否删除（0：存在，1：删除）")
    private Byte isDeleted;

    //下属部门
    @TableField(exist = false)
    private List<DepartmentRes> departments;

}
